package DesignMode.Strategy.java8;

public class Test {
    public static void main(String[] args) {
//        Validator numberValidator = new Validator(new IsNumeric());
        Validator numberValidator = new Validator(s -> s.matches("[a-z]+"));
        boolean b1 = numberValidator.validate("aaaa");
        Validator lowerCaseValidator = new Validator(s -> s.matches("\\d+"));
        boolean b2 = lowerCaseValidator.validate("aaaa");
        System.out.println(b1+":"+b2);
    }
}
